#ifndef MANUALCALIBVIEWMODEL_H
#define MANUALCALIBVIEWMODEL_H

#include <QString>
#include <QSqlTableModel>
#include <QSqlRecord>



class ManualCalibViewModel : public QSqlTableModel
{
public:
    ManualCalibViewModel();
    ~ManualCalibViewModel();

    QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const;
    Qt::ItemFlags flags(const QModelIndex &index) const;

    struct ManualCalibParam
    {
        QString wbc;
        QString wbcCalibDate;
        QString rbc;
        QString rbcCalibDate;
        QString hgb;
        QString hgbCalibDate;
        QString  mcv;
        QString mcvCalibDate;
        QString  plt;
        QString pltCalibDate;
    };

    struct ManualCalibParamValue
    {
       double wbc;
       double rbc;
       double hgb;
       double mcv;
       double plt;
    };

    //全血用户校准
    ManualCalibParamValue wbUserCalib;
    //预稀释用户校准
    ManualCalibParamValue prediluUserCalib;
    //全血厂家校准
    ManualCalibParamValue wbProducerCalib;
    //预稀释厂家校准
    ManualCalibParamValue prediluProducerCalib;
    //全血传递系数
    ManualCalibParamValue wbTransfer;
    //预稀释传递系数
    ManualCalibParamValue prediluTransfer;

//signals:
//    void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);

};

#endif // MANUALCALIBVIEWMODEL_H
